<template>
  <div class="lb-goods-list">
    <top-nav />
  </div>
</template>

<script>
import moment from 'moment'
export default {
  data () {
    return {
      bind_technician_img: 'https://lbqnyv2.migugu.com/bianzu18.png',
      subForm: {
        bind_technician_img: [],
        agent_article_id: '',
        agent_article_title: ''
      },
      subFormRules: {
        bind_technician_img: {
          required: true, type: 'array', message: '请选择绑定' + this.$t('action.attendantName') + '背景图', trigger: 'blur'
        }
      },
      showDialog: false,
      loading: false,
      searchForm: {
        page: 1,
        limit: 10,
        title: '',
        status: 1
      },
      tableData: [],
      total: 0
    }
  },
  created () {
    this.getFormInfo()
  },
  methods: {
    async getFormInfo () {
      let { code, data } = await this.$api.system.configInfo()
      if (code !== 200) return
      data.bind_technician_img = data.bind_technician_img && data.bind_technician_img.length > 0 ? [{ url: data.bind_technician_img }] : []
      for (let key in this.subForm) {
        this.subForm[key] = data[key]
      }
    }
  },
  filters: {
    handleTime (val, type) {
      let time = type === 1 ? moment(val * 1000).format('YYYY-MM-DD') : type === 2 ? moment(val * 1000).format('HH:mm:ss') : moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
      return time
    }
  }
}
</script>

<style scoped lang="scss">

</style>
